<%@ page language="java" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<div id="page-content" class="page-content">
		<div class="panel panel-default oparePanel">
			<div class="panel-body">
				<div class="searchBox">
				<input type="text" id="searchStr" name="searchStr"  placeholder="按用户姓名搜索" class="input_search" />
				<input type="submit"  class="btn_search" onclick="user.search('searchStr');"/>
				</div>
		
				<div class="opare">
					<input type="button"  value="+" class="btn_add" onclick="menuUrl('user/view', 'user:add');" />
					<input type="button"  value="删 除" class="btn" onclick="user.delBatch();"/>
				</div>
		
			</div>
		</div>
		
		<div class="portlet-body">
			<div class="table-scrollable">
				<table class="table table-condensed flip-content">
					<thead class="flip-content">
						<tr>
							<th style="width: 20px;"><input type="checkbox" id="all" name="all" onclick="checkAll('id');"/></th>
							<th width="10%">用户姓名</th>
							<th width="10%">登录名</th>
							<th width="10%">状态</th>
							<th width="10%">查询次数</th>
							<th width="10%">办公电话</th>
							<th width="20%">创建时间</th>
							<th width="30%" class="text-center">操作</th>
						</tr>
					</thead>
					<tbody id="select_tbody">
					   <c:if test="${result.code eq 'SUCCESS' }">
					     <c:forEach items="${result.data.rows}" var ="row" varStatus="status">
						     <tr>
								<td style="width: 20px;" class=""><input type="checkbox" name="id" id="id" value="${row.id }" /></td>
								<td width="10%" class="">${row.userName }</td>
								<td width="10%" class="">${row.account }</td>
								<c:choose>  
								   <c:when test="${row.status eq '0'}"> 
								     <td width="10%" class="">待审批</td>
								   </c:when>  
								   <c:when test="${row.status eq '1'}"> 
								     <td width="10%" class="">正常</td>
								   </c:when>  
								   <c:when test="${row.status eq '2'}"> 
								     <td width="10%" class="">审批失败</td>
								   </c:when>  
								   <c:when test="${row.status eq '3'}"> 
								     <td width="10%" class="">锁定</td>
								   </c:when>  
								   <c:when test="${row.status eq '4'}"> 
								     <td width="10%" class="">停用</td>
								   </c:when> 
								   <c:when test="${row.status eq '5'}"> 
								     <td width="10%" class="">解锁待审批</td>
								   </c:when> 
								   <c:when test="${row.status eq '6'}"> 
								     <td width="10%" class="">恢复待审批</td>
								   </c:when> 
								</c:choose> 
								<td width="10%" class="">${row.limitCount }</td>
								<td width="10%" class="">${row.officePhone }</td>
								<td width="20%" class=""><fmt:formatDate value="${row.createTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
								
								<td width="30%" class="text-center">
									<!--  <a href="javascript:;" onclick="user.dele('${row.id}');" class="a-delet">删除</a> -->
									
								<c:choose>  
								   <c:when test="${row.status eq '1'}"> 
								    <a href="javascript:;" onclick="privilegeuser.add('${row.id}');" class="a-delet">授权</a>
								   </c:when>  
								   <c:otherwise>
								   <a href="javascript:;" class="a-delet disabled">授权</a>
								   </c:otherwise>
								</c:choose> 
								
									<a href="javascript:;" onclick="detailShow('user/view', 'user:detail','${row.id}');" class="a-detial">详情</a>
								</td>
							</tr>
					   </c:forEach>
					   </c:if>
					   
					   
					   
					  
					   
	 
						
						
		
					</tbody>
				</table>
			</div>
		</div>
</div>
				
<c:if test="${result.code eq 'SUCCESS' }">
  
  <script type="text/javascript">

    Page.navigation('page', 'user/view', 'user:page', '${result.data.pageSize}', '${result.data.total}', '${result.data.pageCount}', '${result.data.currPage}', 'menuUrl');

  </script>
  
  <div id="page" class="page"> </div>

</c:if>

<div class="clearfix"></div>